/*
The analyses are organized for the specific results discussed
in the section titled: 

Did some types of experiments do better than others?
*/

use "../Metadata/tess_analysisdata.dta", clear

** Vignette experiments

	* proportion of studies that are vignette studies - 36%
	ta type_vignette if hyp_num == 1

	* positive study results - 81% vs. 39%
	prtest successfulexp_insample if hyp_num == 1, by(type_vignette)

	* rate of supported hypotheses 
	prtest hyp_true if insample == 1, by(type_vignette)

	* sample sizes -- 1316 vs. 682
	table type_vignette if insample==1, stat(median N_person)

	* hypothesis support rates for N>1500
	prtest hyp_true if insample == 1 & N_person >= 1500, by(type_vignette)
 
 
* Rates of supported hypotheses among experiments 
	* highest: Conjoint/DCE = 55.7%
	* lowest: information provision = 4.6%
	foreach var of varlist ///
	type_framing type_priming type_vignette type_questwording type_information type_beliefelicit type_writing type_conj_dce  ///
	{
		display "`var'"
		sum hyp_true if `var' == 1 & insample == 1
	}

* Conjoint/DCE Experiments

	* pct hypotheses supported
	ta hyp_true type_conj_dce if insample == 1, col

	* respondents per test -- 525 vs. 941
	table type_conj_dce if insample == 1, stat(median N_person)

	* estimation sample size -- 4870 vs. 941
	table type_conj_dce if insample == 1, stat(median N)


* Information Experiments
	
	* rate of supported hypotheses -- 5/108
	tab hyp_true type_information if insample==1

	* median number of observatons all types of experiments 
		foreach var of varlist ///
		type_framing type_priming type_vignette type_questwording type_information type_beliefelicit type_writing type_conj_dce {
			display "`var'"
			qui sum N if `var' == 1 & insample == 1, detail
			display r(p50)
		}
